module(..., package.seeall)

require "utils.signalling"
require "utils.table"

local keyboard = require "moaix.input.keyboard"
local mouse    = require "moaix.input.mouse"
local touch    = require "moaix.input.touch"


channel = utils.signalling.Channel("input")
for _, module in ipairs{keyboard, mouse, touch} do
    if module.init() then
        channel:add_child(module.channel)
        channel.registered:include(module.channel.registered)
        table.copy(module.bind_shortcuts, _M)
    end
end
